package com.quan.mall.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import com.baomidou.mybatisplus.annotation.IdType;

import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import javax.validation.constraints.NotNull;
import com.quan.commons.core.bean.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 商品-SKU信息
 *
 * @author yhaoquan
 * @email yhaoquan@163.com
 * @date 2021-03-26 13:03:26
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("pms_sku")
public class PmsSku extends BaseEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * ID
	 */
    @TableId
    private Long id;

	/**
	 * SPU_ID
	 */
    private Long spuId;

	/**
	 * 分类ID
	 */
    private Long cateId;

	/**
	 * sku名称
	 */
    private String skuName;

	/**
	 * sku图片
	 */
    private String skuImg;

	/**
	 * 销售价(元)
	 */
    private BigDecimal salePrice;

	/**
	 * 市场价(元)
	 */
    private BigDecimal marketPrice;

	/**
	 * 成本价(元)
	 */
    private BigDecimal costPrice;

	/**
	 * 库存
	 */
    private Integer stockNum;

	/**
	 * 销量
	 */
    private Integer saleNum;

	/**
	 * 条形码
	 */
    private String barcode;

	/**
	 * 销售属性JSON
	 */
    private String attrs;

	/**
	 * 销售规格JSON
	 */
    private String descar;

	/**
	 * 创建时间
	 */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime ctime;

	/**
	 * 更新时间
	 */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime utime;


}
